<?php

namespace app\controller;

use app\BaseController;
use app\model\ProjectData as ProjectDataModel;

class ProjectData extends BaseController
{

    public function save()
    {
        $model = ProjectDataModel::where("project_id", "=", request()->post('projectId'))->find();
        if (empty($model)) {
            $model = new ProjectDataModel();
        }
        $data = $model->save(request()->post());
        return ["code" => 200, "data" => $data, "msg" => "更新成功"];
    }

}
